const db = require('../db/db');

module.exports = db.defineModel('tb_user', {
	id: {
		type: db.INTEGER(50),
		autoIncrement: true,
		unique: true
	},
	password: { 
		type: db.TEXT(16),
		allowNull: true
	},
	username: { 
		type: db.TEXT(11),
		allowNull: true
	},
	nickname: { 
		type: db.TEXT(10),
		allowNull: true
	},
	canPublish: { 
		type: db.BOOLEAN,
		allowNull: true
	},
	portrait: {
		type: db.BOOLEAN,
		allowNull: true
	},
	likes: { 
		type: db.TEXT(10),
		allowNull: true
	}
});